import { requestClient } from '#/api/request';

// 获取酒店基本信息详情
export async function getHotelBaseInfoApi() {
  return requestClient.post('/admin/user/hotelBaseInfo/get/detail');
}

// 编辑酒店基本信息
export async function updateHotelBaseInfoApi(data: any) {
  return requestClient.post('/admin/user/hotelBaseInfo/update', data);
}

// 酒店图片管理
// 根据一级分类获取酒店图片列表
export async function getImageList(data: any) {
  return requestClient.post(
    '/admin/user/image/get/imageListByTwoCategory',
    data,
  );
}
// 获取分类
export async function getCategoryList() {
  return requestClient.post('/admin/user/image/get/categoryList');
}
// 新增图片
export async function addImage(data: any) {
  return requestClient.post('/admin/user/image/add', data);
}
// 删除
export async function deleteImage(data: any) {
  return requestClient.post('/admin/user/image/delete', data);
}
// 设置精选
export async function recommendImage(data: any) {
  return requestClient.post('/admin/user/image/set/recommend', data);
}
// 编辑图片
export async function updateImage(data: any) {
  return requestClient.post('/admin/user/image/update', data);
}
// 编辑图片
export async function batchUpdate(data: any) {
  return requestClient.post('/admin/user/image/batchUpdate', data);
}

// 房型信息
// 添加房型
export async function addRoomTypeInfo(data: any) {
  return requestClient.post('/admin/user/roomTypeInfo/add', data);
}
// 删除房型
export async function deleteRoomTypeInfo(data: any) {
  return requestClient.post('/admin/user/roomTypeInfo/delete', data);
}
// 房型详情
export async function getRoomTypeInfo(data: any) {
  return requestClient.post('/admin/user/roomTypeInfo/get/detail', data);
}
// 房型列表
export async function getRoomTypeInfoList(data: any) {
  return requestClient.post('/admin/user/roomTypeInfo/listPage', data);
}
// 编辑房型
export async function updateRoomTypeInfo(data: any) {
  return requestClient.post('/admin/user/roomTypeInfo/update', data);
}

// 酒店政策
// 获取政策详情
export async function getHotelPolicies() {
  return requestClient.post('/admin/user/hotelPolicies/get/detail');
}
// 编辑酒店政策
export async function updateHotelPolicies(data: any) {
  return requestClient.post('/admin/user/hotelPolicies/update', data);
}

// 酒店设施
// 设施详情
export async function getHotelFacilityDetail() {
  return requestClient.post('/admin/user/hotelFacility/get/detail');
}
// 编辑酒店设施
export async function updateHotelFacility(data: any) {
  return requestClient.post('/admin/user/hotelFacility/update', data);
}

// 房型设施
// 设施详情
export async function getRoomFacilityDetail() {
  return requestClient.post('/admin/user/room/hotelFacility/get/detail');
}
// 编辑酒店设施
export async function updateRoomFacility(data: any) {
  return requestClient.post('/admin/user/room/hotelFacility/update', data);
}
// 根据房型查询房型设施
export async function getDetailByRoomId(data: any) {
  return requestClient.post(
    '/admin/user/room/hotelFacility/getDetailByRoomId',
    data,
  );
}

// 小程序配置信息
// 通知列表
export async function getMessageList() {
  return requestClient.post('/admin/user/notice/get/list');
}
// 新增通知
export async function addMessageList(data: any) {
  return requestClient.post('/admin/user/notice/add', data);
}
// 删除通知
export async function deleteMessageList(data: any) {
  return requestClient.post('/admin/user/notice/delete', data);
}

// 日历配置
// 新增配置
export async function addConfig(data: any) {
  return requestClient.post('/admin/user/config/add', data);
}
// 修改配置
export async function updateConfig(data: any) {
  return requestClient.post('/admin/user/config/update', data);
}
// 获取详情信息
export async function getConfigDetail() {
  return requestClient.post('/admin/user/config/get/detail');
}

// 首页接口
// 近30天订单走势;
export async function getOrderTrendFor30Days() {
  return requestClient.post('/admin/user/order/home/getOrderTrendFor30Days');
}
// 首页统计数据
export async function getCountHome() {
  return requestClient.post('/admin/user/order/home/getCount');
}
